package ThreadPoolCheck.notify_wait.Cond1;

/**
 * Created by wangyg6 on 2017/11/9.
 * 子线程循环10次，主线程循环10次。接着子线程循环10次，主线程循环10次。如此循环5次。
 */
public class TestDemo {
	public static void main(String[] args) {
		UseSynchronized tc = new UseSynchronized();
		new Thread(() -> {
			for (int i = 1; i <= 5; i++) {
				tc.sub(i);
			}
		}).start();
		for (int i = 1; i <= 5; i++) {
			tc.main(i);
		}
	}
}
